import request from '@/utils/request'
// -------------日历目标------------
const BASE = "/service/actionTarget"

// 获取目标列表
export const getServiceActionTargetListApi = (params) => {
    return request({
        url: `${BASE}/list`,
        method: 'get',
        params
    })
}

// 添加目标
export const addServiceActionTargetApi = (data) => {
    return request({
        url: `${BASE}/add`,
        method: 'post',
        data
    })
}

// 修改目标
export const editServiceActionTargetApi = (data) => {
    return request({
        url: `${BASE}/edit`,
        method: 'put',
        data
    })
}

// 删除目标
export const removeServiceActionTargetApi = (params) => {
    return request({
        url: `${BASE}/remove`,
        method: 'DELETE',
        params
    })
}

// 获取所有问圈成员 /service/circle/selectUserByCircle
export const getSelectUserByCircleApi = params => {
    return request({
      url: `/service/circle/selectUserByCircle`,
      method: "GET",
      params
    });
};

// 退出目标的接口  /service/actionTarget/quitTarget
export const quitTargetActionTargetApi = (params) => {
    return request({
        url: `${BASE}/quitTarget`,
        method: 'DELETE',
        params
    })
}
// 修改任务显示和隐藏 
export const targetDisplayApi = (data) => {
    return request({
        url: `${BASE}/updateDisplay?id=${data.id}&display=${data.display}`,
        method: 'post',
    })
}